package com.company.project.authorization.action;

import java.io.Serializable;

import swingxrcp.framework.server.action.AbstractAction;
import swingxrcp.framework.server.bean.Bean;

import com.company.project.authorization.domain.User;
import com.company.project.authorization.service.LoginService;

@Bean("loginAction")
public class LoginAction extends AbstractAction<User> {

	private LoginService loginService;

	public void setLoginService(LoginService loginService) {
		this.loginService = loginService;
	}

	public Serializable doExecute(User user) {
		return loginService.login(user.getUsername(), user.getPassword());
	}

}
